/*
 * Preferences.java
 *
 * Created on November 6, 2008, 8:08 AM
 */

package openrule;

import java.util.Vector;

/**
 *
 * @author  pborrego
 */
public class Preferences extends javax.swing.JFrame {

    /** Creates new form Preferences */
    public Preferences(Vector<String> prefs) {
        this.prefs = prefs;
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabPrefs = new javax.swing.JTabbedPane();
        pnlAbout = new javax.swing.JPanel();
        pnlTxtLabels = new javax.swing.JPanel();
        lblProgramTitle = new javax.swing.JLabel();
        lblProgramVersion = new javax.swing.JLabel();
        pnlGlobalControls = new javax.swing.JPanel();
        btnSave = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Preferences");

        pnlAbout.setPreferredSize(new java.awt.Dimension(300, 100));

        pnlTxtLabels.setLayout(new java.awt.GridLayout(0, 1));

        lblProgramTitle.setText("OpenRule Mercury");
        pnlTxtLabels.add(lblProgramTitle);

        lblProgramVersion.setText("Version 1.1");
        pnlTxtLabels.add(lblProgramVersion);

        pnlAbout.add(pnlTxtLabels);

        tabPrefs.addTab("About", pnlAbout);

        getContentPane().add(tabPrefs, java.awt.BorderLayout.CENTER);

        pnlGlobalControls.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        btnSave.setText("Save");
        btnSave.setEnabled(false);
        pnlGlobalControls.add(btnSave);

        btnClose.setText("Close");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });
        pnlGlobalControls.add(btnClose);

        getContentPane().add(pnlGlobalControls, java.awt.BorderLayout.SOUTH);

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
    // close without saving changes...
    this.dispose();
}//GEN-LAST:event_btnCloseActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnSave;
    private javax.swing.JLabel lblProgramTitle;
    private javax.swing.JLabel lblProgramVersion;
    private javax.swing.JPanel pnlAbout;
    private javax.swing.JPanel pnlGlobalControls;
    private javax.swing.JPanel pnlTxtLabels;
    private javax.swing.JTabbedPane tabPrefs;
    // End of variables declaration//GEN-END:variables

    Vector<String> prefs;
}
